
<template>
  <div style="border-bottom:1px solid #dfe6ec; padding:10px 0;">
      <div style="float:left; width:100px; height:50px; text-align:center;"><img style="width:50px;" :src="item.avataUrl"></div>
      <div style="float:left; width:150px; height:50px; text-align:left; line-height:50px;">{{item.nickName}}</div>
      <div style="float:left; width:150px; height:50px; text-align:center; line-height:50px;"></div>
      <div style="float:left; width:300px; height:50px; text-align:center; line-height:50px;"><el-button type="text" size="small" @click="del(item.id)" >删除</el-button></div>
      <div style="clear:both"></div>
  </div>
</template>

<script type="text/ecmascript-6">
  export default{
    props: {
      item: {
        type: Object
      },
      index: {
        type: Number
      },
      ctype: {
        type: Number,
        default: 1
      }
    },
    data () {
      return {
      }
    },
    methods: {
      del (id) {
        // 获取公众号关注者
        this.$http.post('/smartLight/web/openremind/delete.htm', {id: id, type: this.ctype}).then(response => {
          let resBody = response.body
          if (resBody.isSuccess === 0) {
            this.$message({
              showClose: true,
              message: '操作成功',
              type: 'success'
            })
            this.$emit('updateremindList')
          } else {
            this.$message({
              showClose: true,
              message: resBody.errorMsg,
              type: 'error'
            })
          }
        }).catch(() => {})
      }
    },
    mounted () {
    }
  }

</script>

<style lang="stylus" rel="stylesheet/stylus">

</style>
